import React, { Component } from 'react';
import './publicfoot.scss'
import { NavLink } from 'react-router-dom'

let footTitle = [
    {
        id: 0,
        name: '首页 ',
        icon: 'icon-changyonglogo40',
        chios: false,
        pathname: '/home'
    },
    {
        id: 1,
        name: '搜索 ',
        icon: ' icon-sousuo',
        chios: false,
        pathname: '/search'
    },
    {
        id: 2,
        name: '订单 ',
        icon: 'icon-dingdan1',
        chios: false,
        pathname: '/cart'
    },
    {
        id: 3,
        name: '我的 ',
        icon: 'icon-wode',
        chios: false,
        pathname: '/about'
    },

]
class foot extends Component {
    state = {
        index: 0,
        pathName:"/home"
    }
    render() {
     //   console.log(this);
        return (
            <div className="foot">
                {
                    footTitle.map((item, key) => {
                        return (
                            <NavLink to={item.pathname} key={key} index={key} className="foot-item " activeClassName='active'>
                                  <div className="foot-item-info">
                                    <i className={'iconfont ' + item.icon}></i>
                                    <span>{item.name}</span>
                                </div>
                            </NavLink>
                        )
                    })
                }
      </div>
    );
  }
}

export default foot;
